<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>同步His续费 以及今日需要续费的患者-frame</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.2.0.css" />
    <style>
        .hospital>div {
            width: 100%;
            height: 40px;
            /* margin-top: 5px; */
        }

        .hospital>div:nth-of-type(odd) {
            background-color: #ddd;
        }

        .hospital>div:nth-of-type(even) {
            background-color: #8bcdfb;
        }

        .hospital>div>span {
            padding-left: 5px;
            display: inline-block;
            height: 40px;
            line-height: 40px;
        }

        .aui-list-item-inner>div {
            display: -webkit-flex;
            display: flex;
            justify-content: space-around;
            align-items: center;
            width: 100%;
        }

        .aui-list-item-inner>div>span:nth-child(1) {
            text-align: left;
            padding-left: 10px;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            -ms-box-sizing: border-box;
            -o-box-sizing: border-box;
            box-sizing: border-box;
        }

        .aui-list-item-inner-icon>div>span:nth-child(2) {
            display: inline-block;
            background-image: url('../image/nickname.png');
            width: 100px;
            height: 40px;
            background-repeat: no-repeat;
            background-position: 0px 5px;
            background-size: 20px 20px;
            line-height: 40px;
            text-align: left;
            padding-left: 25px;
        }

        .aui-list-item-inner>div>span:nth-child(4) {
            display: inline-block;
            width: 100px;
            height: 40px;
            background-repeat: no-repeat;
            background-position: 25px 5px;
            background-size: 25px 25px;
            line-height: 40px;
        }

        .aui-btn-info,
        .aui-btn-danger {
            width: 60px;
            height: 30px;
            text-align: center;
            line-height: 10px;
            padding: 10px 10px 13px 10px !important;
        }

        .aui-iconfont {
            font-size: 14px;
        }

        .aui-btn-danger {
            background-color: #d4237a !important;
        }

        .aui-content ul li:nth-of-type(odd) {
            background: #f0f0f0;
        }

        .aui-list-item-inner>div>span {
            display: block;
            text-align: left;
            font-size: 14px;
            width: 20%;
        }

        .aui-list-header {
            position: relative;
            font-size: 20px !important;
            /* padding: 0.7rem 2rem; */
        }
        .aui-list-header::before{
            content: "";
            display: inline-block;
            height: 0.8rem;
            width: 0.3rem;
            border-radius: 0.8rem;
            position: absolute;
            left: 0.6rem;
            background: pink;
        }
        .aui-list-compare-form>li>div>div>span {
            width: 17%;
        }
        .aui-list-currency {
            height: 50px !important;
            line-height: 50px !important;
        }

        .aui-list-header-currency {
            height: 50px !important;
            line-height: 50px !important;
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            right: 0;
            display: block;
        }
    </style>
</head>

<body>
    <section class="hospital">
        <div class="aui-content aui-margin-b-15">
            <ul class="aui-list aui-list-in">
                <li class="aui-list-header" style="padding: 0.8rem 1.4rem">今日续费同步患者信息
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div>
                            <span>金额</span>
                            <span>姓名</span>
                            <span>住院号</span>
                            <span>次数</span>
                            <span>时间</span>
                        </div>
                    </div>
                </li>
                <li class="aui-list-item" @click="PatientDetails(item)" v-for="(item, index) in RenewalOfSynchronization">
                    <div class="aui-list-item-inner aui-list-item-inner-icon">
                        <div>
                            <span>{{item.F_charge}}</span>
                            <span>{{item.F_paientname}}</span>
                            <span>{{item.F_reserveid}}</span>
                            <span style="color: #03a9f4;" v-if="item.F_reservenumber !== '0'">{{item.F_reservenumber}}</span>
                            <span style="color: #e51c23;" v-if="item.F_reservenumber === '0'">{{item.F_reservenumber}}</span>
                            <span>{{item.F_CreatorTime}}</span>
                        </div>
                    </div>
                </li>
            </ul>
            <ul class="aui-list aui-list-in aui-list-compare-form" style="margin-top: 40px;">
                <li class="aui-list-header" style="padding: 0.8rem 1.4rem;">今日需要续费的患者
                    <!-- <span>总人数：10位</span> -->
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div>
                          <span>金额</span>
                          <span>姓名</span>
                          <span>住院号</span>
                          <span>次数</span>
                          <span>时间</span>
                        </div>
                    </div>
                </li>
                <li class="aui-list-item" @click="PatientDetails(item)" v-for="(item, index) in HisRenew">
                    <div class="aui-list-item-inner aui-list-item-inner-icon">
                        <div>
                          <span>{{item.F_charge}}</span>
                          <span>{{item.F_paientname}}</span>
                          <span>{{item.F_reserveid}}</span>
                          <span style="color: #03a9f4;" v-if="item.F_reservenumber !== '0'">{{item.F_reservenumber}}</span>
                          <span style="color: #e51c23;" v-if="item.F_reservenumber === '0'">{{item.F_reservenumber}}</span>
                          <span>{{item.F_CreatorTime}}</span>
                        </div>
                    </div>
                </li>
                <!-- <li class="aui-list-header aui-list-currency">
                    <span class="aui-list-header-currency">总金额：1050</span>
                </li> -->
            </ul>
        </div>
    </section>
</body>

</html>

<script src="../script/api.js" charset="utf-8"></script>
<script src="../script/vue.js" charset="utf-8"></script>
<script src="../js/ToConfigure.js" charset="utf-8"></script>
<script src="../script/aui-toast.js" charset="utf-8"></script>
<script type="text/javascript">
    apiready = function() {

        var vm = new Vue({
            el: '.hospital',
            data: {
                manIcon: {
                    backgroundImage: "url(../image/sex_man.png)"
                },
                womanIcon: {
                    backgroundImage: "url(../image/sex_woman.png)"
                },
                RenewalOfSynchronization: [],    //今日续费同步患者信息
                HisRenew: [],                    //今日His续费患者信息
                Url_IP: ""                       //配置IP地址
            },created(){
              //获取所属医院IP地址
              this.Url_IP = ToConfigure_IP("Gorgeous");



              //今日续费同步患者
              //json参数
              var JsParms = new Object();
               JsParms.currPage = 1000;
              var StrJson_1 = JSON.stringify(JsParms);
              api.ajax({
                  url: this.Url_IP+'/SynchronousRenwal/Query_HISOF_Charger/',
                  method: 'post',
                  data: {
                      values: {
                          parms: StrJson_1
                      }
                  },
              },function(ret, err){
                  if (ret) {
                      vm.RenewalOfSynchronization = ret;
                  } else {
                    var toast = new auiToast();
                    toast.fail({
                        title: "暂无同步患者",
                        duration: 2000
                    });
                  }
              });




              //今日His续费患者信息
              //json参数
              var JsParms = new Object();
               JsParms.currPage = 1000;
              var StrJson_2 = JSON.stringify(JsParms);
              api.ajax({
                  url: this.Url_IP+'/SynchronousRenwal/Query_His_HBO_Cost/',
                  method: 'post',
                  data: {
                      values: {
                          parms: StrJson_2
                      }
                  },
              },function(ret, err){
                  if (ret) {
                      vm.HisRenew = ret;
                  } else {
                    var toast = new auiToast();
                    toast.fail({
                        title: "暂无His续费患者",
                        duration: 2000
                    });
                  }
              });
            },
            methods: {
                PatientDetails: function(item) {
                    api.openWin({
                        name: 'patientDetailHeader',
                        url: './patientDetailHeader.html',
                        pageParam: {
                            name: 'test'
                        }
                    });
                }
            }
        })

        // if (api.pageParam.info !== undefined) {
        //     vm.RenewalOfSynchronization = vm.evaluationList
        //     vm.evaluationList = [];
        //     var info = JSON.parse(api.pageParam.info)
        //     vm.evaluationList.push(info)
        // }
        //
        // // 下拉监听
        // var param = {};
        // param.loadingImgae = 'widget://image/refresh.png'; //定义刷新小箭头的图片
        // param.bgColor = 'transparent'; //定义下拉刷新区域的背景
        // param.textColor = '#111'; //定义下拉刷新提示文字的颜色
        // param.textDown = '下拉刷新...'; //定义下拉刷新文字
        // param.textUp = '松开试试...'; //定义松开刷新文字
        // param.showTime = true; //定义是否显示最后一次刷新时间
        // api.setRefreshHeaderInfo(param, function(ret, err) {
        //     vm.evaluationList = vm.RenewalOfSynchronization
        //     setTimeout(() => {
        //         api.refreshHeaderLoadDone(); //复位下拉刷新
        //     }, 500)
        // });
        //
        // // 加载监听
        // api.addEventListener({
        //     name: 'scrolltobottom'
        // }, function(ret, err) {
        //     api.showProgress({
        //         title: '努力加载中...',
        //         text: '',
        //         modal: true
        //     });
        //
        //     setTimeout(() => {
        //         api.hideProgress()
        //     }, 1000)
        // });
    }

    function enterEvaluation() {
        api.openWin({
            name: 'evaluation-header',
            url: './evaluation-header.html',
            pageParam: {
                name: 'evaluation-header'
            }
        });
    }

    function enterConsent() {
        api.openWin({
            name: 'consent-header',
            url: './consent-header.html',
            pageParam: {
                name: 'consent-header'
            }
        });
    }
</script>
